﻿<Window x:Class="ABCat.UI.WPF.UI.ErrorWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
        xmlns:shared="clr-namespace:ABCat.Shared;assembly=ABCat.Shared"
        xmlns:converters="clr-namespace:ABCat.Core.Converters;assembly=ABCat.Core"
        Title="ErrorWindow" Height="236" Width="730">
	<i:Interaction.Behaviors>
		<shared:ModernWindowBehavior />
	</i:Interaction.Behaviors>

	<Window.Resources>
		<converters:ValueToVisibilityConverter x:Key="Vvc"/>
	</Window.Resources>

	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="32*"/>
			<RowDefinition Height="Auto"/>
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="Auto"/>
			<ColumnDefinition Width="1*"/>
		</Grid.ColumnDefinitions>
		<Grid>
			<Grid.RowDefinitions>
				<RowDefinition Height="1*"/>
				<RowDefinition Height="1*"/>
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto"/>
				<ColumnDefinition Width="559*"/>
			</Grid.ColumnDefinitions>
			<ContentPresenter Width="36" Margin="10" Content="{StaticResource BugIcon}"/>
			<ContentPresenter Visibility="{Binding ExceptionType, Converter={StaticResource Vvc}, ConverterParameter=Info}" Grid.Row="1" Grid.Column="0" Width="36" Margin="10" Content="{StaticResource InfoIcon}"/>
			<ContentPresenter Visibility="{Binding ExceptionType, Converter={StaticResource Vvc}, ConverterParameter=Warning}"  Grid.Row="1" Grid.Column="0" Width="36" Margin="10" Content="{StaticResource WarningIcon}"/>
			<ContentPresenter Visibility="{Binding ExceptionType, Converter={StaticResource Vvc}, ConverterParameter=Stop}"  Grid.Row="1" Grid.Column="0" Width="36" Margin="10" Content="{StaticResource StopIcon}"/>
		</Grid>
		<Grid Grid.Row="0" Grid.Column="1" >
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="Auto"/>
			</Grid.RowDefinitions>
		</Grid>
		<StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Bottom" Orientation="Horizontal"> 
			<Button Margin="5" MinWidth="80" Command="{Binding OpenLogCommand}">Лог</Button>
			<Button Margin="5" MinWidth="80" Command="{Binding CloseCommand}">Закрыть</Button>
		</StackPanel>
	</Grid>
</Window>
